<html>
	<head>
			<script
				type="text/javascript"
				language="javascript"
				src="../lib/myUnit.js">
			</script>
			<script
				type="text/javascript"
				language="javascript"
				src="../src/pgn.js">
			</script>
			<script
				type="text/javascript"
				language="javascript"
				src="../src/converter.js">
			</script>
			<script
				type="text/javascript"
				language="javascript"
				src="../lib/log4javascript.js">
			</script>

			<script>
				var log = log4javascript.getDefaultLogger();
				
				function testCase1() {
					var pgn = new Pgn(document.getElementById('case1').firstChild.nodeValue)
					var conv = new Converter(pgn)
					conv.convert()
					assertEquals(44, conv.moves.length)
				}

				function testEnPassante() {
					var pgn = new Pgn(document.getElementById('enPassante').firstChild.nodeValue)
					var conv = new Converter(pgn)
					conv.convert()
				}

				function runTests() {
					suite = new TestSuite()
					suite.addTest(testCase1)
					suite.runTests()
				}
			</script>
  </head>

  <body onLoad="runTests()">
		<div id="case1" style="visibility:hidden; display:none">
[Event "2nd Samba Cup"]
[Site "Skanderborg DEN"]
[Date "2005.10.14"]
[Round "1"]
[White "Hansen,LB"]
[Black "Bruzon,L"]
[Result "1/2-1/2"]
[WhiteElo "2565"]
[BlackElo "2677"]
[EventDate "2005.10.14"]
[ECO "D47"]

1. d4 d5 2. c4 c6 3. Nc3 Nf6 4. Nf3 e6 5. e3 Nbd7 6. Bd3 dxc4 7. Bxc4 b5 8.
Be2 b4 9. Na4 Be7 10. O-O O-O 11. a3 a5 12. axb4 axb4 13. Bd2 Bb7 14. Qc2
Qa5 15. Rfc1 Rfc8 16. Qd1 Qd8 17. Be1 Nd5 18. Nd2 c5 19. Nxc5 Rxa1 20. Rxa1
Nxc5 21. dxc5 Bxc5 22. Bf3 1/2-1/2
		</div>
<div id='result'>
</div>
<script>
</script>
  </body>
</html>
